Storage communication protocols such as the Serial Attached Small Computer Systems Interface (SAS) and Fibre Channel Arbitrated Loop (FCAL) provide a connection-oriented service with acknowledged delivery. A connection is established between devices prior to transfer of data between them. In the event that the connection is terminated, the connection must be re-established prior to resuming transfer of the data. The process for establishing the connection may require an exchange of frames between the devices.
There may be many simultaneous active connections requiring the management of thousands of task requests that are typically issued by a device driver in the operating system to a storage controller. A task represents the work associated with a command or group of linked commands. A context associated with the task is typically stored in a data structure and includes information required to process the task. The information may include the type of command to be issued and an identifier identifying the storage device to which the command is to be issued. One example of a task may be a command to write a file to a disk drive and the parameters of the command include a number of sectors to write on the disk drive.
As the issued task requests may be queued prior to being processed, each task request is typically assigned both an Input/Output (I/O) tag and a context identifier (ID) which are used to track the tasks. The context ID is typically assigned by hardware in the storage controller and used by the hardware to associate tasks with specific resources in the storage controller. The I/O tag is typically assigned by firmware in the storage controller and used by the firmware to identify the task. The context ID may be unrelated to the I/O tag.
A large task request queue is required in the storage controller to store the task requests and their associated context for all task requests issued to the storage controller. Furthermore, a request to abort or suspend a task issued by firmware in the storage controller requires finding a context ID associated with the I/O tag prior to processing the request. A list of tasks in process must be searched in order to find one with a matching I/O tag. This requires additional logic which is dependent on the number of tasks in progress.
An alternative to searching through a list of tasks is to have the hardware in the storage controller return the context ID assigned to each task when it accepts a task from firmware. The returned context ID is stored in a mapping table with the associated I/O tag. Instead of having to search through the entire list, the mapping table can be searched for a matching context ID. However, the return of a context ID for each task increases the number of accesses to the hardware that are performed for each task. Instead of two accesses, one to issue the request and the second to accept completion status, a third access is required by firmware to retrieve the context ID and store it in the mapping table with the I/O tag. Furthermore, although the context ID is rarely used this third access is required for each task in case the context ID is needed by the firmware to abort or suspend a task.
Although the following Detailed Description will proceed with reference being made to illustrative embodiments of the claimed subject matter, many alternatives, modifications, and variations thereof will be apparent to those skilled in the art. Accordingly, it is intended that the claimed subject matter be viewed broadly, and be defined only as set forth in the accompanying claims.